package spike.pull;

import java.util.concurrent.TimeUnit;

public class PoolFactoryImpl<T> implements PoolFactory<T> {
    @Override
    public ConnectionPoolImpl<T> newConnectionPool(int capacity, ConnectionSource<T> src) {
        return new ConnectionPoolImpl<T>(src, capacity, capacity, -1, TimeUnit.DAYS);
    }

    @Override
    public ConnectionPoolImpl<T> newConnectionPool(int init, int max, long keepAliveTime, TimeUnit unit, ConnectionSource<T> src) {
        return new ConnectionPoolImpl<T>(src, init, max, keepAliveTime, unit);
    }
}
